<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserinfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create( 'userinfos', function ( Blueprint $table ) {
            $table->increments( 'id' );
            $table->string( 'username', 16 )->comment( '学号' );
            $table->string( 'openid', 64 )->comment( '微信openid' );
            $table->text( 'edu_info' )->comment( '教务处网站的个人信息' );
            $table->text( 'wechat_info' )->comment( '微信的个人信息' );
            $table->timestamps();
        } );
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop( 'userinfos' );
    }
}
